package com.example.demo.dubbo.impl;

import com.example.demo.dubbo.UserDubboService;
import com.example.demo.po.User;
import com.example.demo.service.UserService;
import org.apache.dubbo.config.annotation.DubboService;

import javax.annotation.Resource;
import java.util.List;

@DubboService
public class UserDubboServiceImpl implements UserDubboService {

    @Resource
    private UserService userService;

    @Override
    public User getById(Long id) {
        return userService.getById(id);
    }

    @Override
    public List<User> getAll() {
        return userService.getAll();
    }

    @Override
    public boolean create(User user) {
        return userService.create(user);
    }

    @Override
    public boolean update(User user) {
        return userService.update(user);
    }

    @Override
    public boolean deleteById(Long id) {
        return userService.deleteById(id);
    }

    @Override
    public boolean batchCreate(java.util.List<User> users) {
        return userService.batchCreate(users);
    }

    @Override
    public java.util.List<User> listPage(int pageNum, int pageSize) {
        return userService.listPage(pageNum, pageSize);
    }

    @Override
    public User getByPhone(String phone) {
        return userService.getByPhone(phone);
    }
}